package com.lipeng.service.impl;

import com.lipeng.bean.Game;
import com.lipeng.bean.Master;
import com.lipeng.mapper.GameMapper;
import com.lipeng.mapper.MasterMapper;
import com.lipeng.service.MasterService;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import java.util.List;

/**
 * Created by dllo on 18/3/8.
 */
@Service
public class MasterServiceImpl implements MasterService {
    @Resource
    private MasterMapper masterMapper;


    @Override
    public Master selectMasterById(Integer mid) {
        return masterMapper.selectByPrimaryKey(mid);
    }

    @Override
    public List<Master> selectAllMaster() {
        return masterMapper.selectAllMaster();
    }

    @Override
    public int insertMaster(Master master) {
        return masterMapper.insert(master);
    }

    @Override
    public int updateMaster(Master master) {
        return masterMapper.updateByPrimaryKey(master);
    }

    @Override
    public int deleteMasterById(Integer mid) {
        return masterMapper.deleteByPrimaryKey(mid);
    }

    @Override
    public List<Master> selectMasterByName(String name) {
        return masterMapper.selectMasterByName(name);
    }
}
